@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-11">
            <div class="card">
                <div class="card-header">业务员列表</div>
                <table id="ddtable"class="table table-condensed table-responsive table-bordered ">
                    <tr>
                        <td class='lead'>姓名</td>
                        <td class='lead'>邮箱</td>
                        <td class='lead'>手机</td>
                        <td class='lead'>时间</td>
                        <td class='lead'>二维码</td>
                    </tr>
                    @if (Auth::user()->role=='admin')
                    @if ($users!=null)
                    <tr>
                        @foreach ($users as $user)
                        <td>{{$user->name}}</td>
                        <td>{{$user->email}}</td>
                        <td>{{$user->phone}}</td>
                        <td>{{$user->created_at}}</td>
                        <td><a href='/qrcodes/{{$user->uuid}}.png'>下载二维码</a></td>
                    </tr>
                    @endforeach
                    @endif
                </div>
                </table>
                @endif
        </div>
    </div>
{{ $users->links() }}
</div>
</div>
</div>
</div>
@endsection
